$font-active-color: #f5f5f5;
$active-color: #2ea6cc;
$warn-color: #df5000;
@import "src/theme/global.module.scss";

ul.toolbarUl {
  display: flex;
  height: 100%;
  line-height: 1;
  list-style: none;
  margin: 0;
  padding: 0;

  >li {
    margin-top: 4px;
    height: 52px;
    padding: 4px;
    cursor: pointer;
    position: relative;
    min-width: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    :global(.iconfont) {
      display: block;
      width: 18px;
      height: 18px;
      margin-bottom: 5px;
      font-size: 18px;
    }

    :global(.#{$ant-prefix}-dropdown-trigger) {
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }
  }

  &.chartActions {
    margin-right: 20px;
    li {
      color: #9c9a98;

      :global(.iconfont) {
        color: #9c9a98;
      }

      &.active {
        color: #f5f5f5;

        &:hover {
          background-color: #050709;
        }

        :global(.iconfont) {
          color: $font-active-color;
        }
      }
    }
  }

  &.helperLink{
    margin-left: auto;
    margin-right: 40px;
    li{
      color: #f5f5f5;
      &:hover {
        background-color: #050709;
      }
    }
  }

  &.dvActions{
    li{
      color: #f5f5f5;
      &:hover {
        background-color: #050709;
      }
    }
  }



  &.chartsToolBar {
    margin-right: 20px;

    >li {
      color: $font-active-color;
      position: relative;

      :global(.iconfont) {
        color: $font-active-color;
      }
      &:hover {
        background-color: #050709;
      }

      //头部图表导航 下拉仓库
      .toolbarDropdown {
        display: none;
        position: absolute;
        top: 52px;
        width: 464px;
        left: -190px;
        height: auto;
        padding-top: 6px;
        z-index: 999999;


        .storeContainer{
          border: 1px solid #ccc;
          border-radius: 4px;
          box-shadow: 0 2px 6px rgba(0,0,0,.1);
          padding: 4px;
          background-color: #fff;
          color: #58666e;
          //min-height: 130px;
          max-height: calc(100vh - 80px);
          overflow-y: auto;
          ul.toolList{
            display: flex;
            flex-wrap: wrap;
            >li:not(.tool_title){
              width: 79px;
              white-space: nowrap;
              overflow: hidden;
              cursor: pointer;
              display: flex;
              flex-direction: column;
              justify-content: center;
              align-items: center;
              margin: 0 5px 4px;
              .tool-icon{
                background-position: center;
                background-size: contain;
                background-repeat: no-repeat;
                position: relative;
                display: inline-block;
                height: 44px;
                width: 100%;
                margin: 8px 12px 0;
                border-radius: 2px;
                background-image: url("/public/assets/tool-items/chart_default.png");
              }
              >.tool-title{
                line-height: 16px;
                font-size: 12px;
                padding: 5px 0;
                margin-bottom: 4px;
                color: #333;
                text-align: center;
              }
              &:hover{
                background-color: rgba(153,153,153,.2);
              }
            }
            >li.tool_title{
              width: calc(100% - 32px);
              text-align: left;
              height: 40px;
              line-height: 40px;
              font-size: 14px;
              font-weight: 500;
              color: #23b7e5;
              margin: 0 16px 10px;
              border-bottom: 1px solid #eee;
            }
          }
        }

      }

      &.showDropTool{
        background-color: #050709;
        .toolbarDropdown{
          display: block;
        }
      }

      &.active {
        background-color: #050709;
      }

    }
  }

}

// 左侧图表管理
.siderPanelBox{
  height: 100%;
  width: 100%;
  border-right: 3px solid #c5c5c5;

  .title{
    line-height: 48px;
    text-align: center;
    font-size: 16px;
    height: 48px;
    border-bottom: 1px solid #ccc;
    position: relative;
    .close{
      position: absolute;
      left: 10px;
      top: 15px;

    }

  }

  ul.chartsPanel{
    background-color: #f5f5f5;
    overflow-x: hidden;
    overflow-y: auto;
    height: calc(100% - 48px);
    li{
      list-style: none;
      padding: 5px 10px;
      border: 2px solid transparent;
      cursor: move;
      white-space: nowrap;
      text-overflow: ellipsis;
      position: relative;
      margin-bottom: 1px;
      //background: cornflowerblue;
      &:after{
        content: '';
        position: absolute;
        bottom:-3px;
        left: 0;
        right: 0;
        height: 1px;
        background: #ccc;
      }

      &.selected{
        border: 2px solid $active-color;
        background: rgba(0, 163, 201, 0.1);
        //border-bottom: 1px solid transparent;
        &:after{
          background: transparent;
        }
        &:before{
          content: '';
          position: absolute;
          top:-3px;
          left: 0;
          right: 0;
          height: 1px;
          background: #ececec;
        }
      }
      &.warnLeft{
        border-left-color: $warn-color;
      }
      &.warnTop{
        border-top-color: $warn-color;
      }
      &.warnRight{
        border-right-color: $warn-color;
      }
      &.warnBottom{
        border-bottom-color: $warn-color;
      }
      &.warnBorder{
        border-color: $warn-color;
      }
    }
  }
}

.siderManageBox{
  background-color: #3a3f50;
  width: 100%;
  color: #ccc;
  border-top: 1px solid rgba(204, 204, 204, 0.24);
  height: 100%;
  :global{
    .#{$ant-prefix}-menu-inline-collapsed > .#{$ant-prefix}-menu-item{
      padding: 0 2px!important;
      height: 32px;
      line-height: 32px;
      margin: 1px 0;
      display: flex;
      justify-content: center;
      align-items: center;
      &:first-child{
        margin-top: 0;
      }
    }
  }
  .menuBox{
    height: 100%;
    overflow: auto;
    @include scrollbar_theme
  }
}

// 绘画仪表盘
.drawHeaderBox{
  overflow: hidden;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  >dl{
    margin: 0 50px 0 0;
    position: relative;
    height: 100%;
    width: 350px;
    dt{
      font-size: 16px;
      font-weight: 500;
      margin-top: 10px;
    }
    dd{
      color: #cccccc;
      &.btnActions{
        position: absolute;
        right: -200px;
        text-align: right;
        top: 18px;
      }
    }
  }


}


